package cn.ccenjie.helloworld;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileOutputStream;

/**
 * HELLO WORLDC程序
 * lambda表达式
 */
public class Main {

    public static String toUp(String s) {
        return s.toLowerCase();
    }

    public static void main(String[] args) throws Exception{
        BufferedImage read = ImageIO.read(new File("C:\\Users\\Administrator\\Desktop\\demo\\id-back.jpg"));
        int width = read.getWidth();
        int height = read.getHeight();
        System.out.println(width + ":" + height);
        BufferedImage bufferedImage = ImageUtils.cropImage(read, 0, 0, width, width);
        ImageIO.write(bufferedImage, "JPEG", new FileOutputStream("C:\\Users\\Administrator\\Desktop\\demo\\id-back-cro.jpg"));

    }




}
